Optimal. Leaf size=168 \[ \frac {2^{\frac {1+p}{2}} g F_1\left (\frac {1}{2} (1+2 m+p);\frac {1-p}{2},-n;\frac {1}{2} (3+2 m+p);\frac {1}{2} (1+\sin (e+f x)),-\frac {d (1+\sin (e+f x))}{c-d}\right ) (g \cos (e+f x))^{-1+p} (1-\sin (e+f x))^{\frac {1-p}{2}} (a+a \sin (e+f x))^{1+m} (c+d \sin (e+f x))^n \left (\frac {c+d \sin (e+f x)}{c-d}\right )^{-n}}{a f (1+2 m+p)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.19, antiderivative size = 168, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 35, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.114, Rules used = {3000, 145, 144,
143} \begin {gather*} \frac {g 2^{\frac {p+1}{2}} (1-\sin (e+f x))^{\frac {1-p}{2}} (a \sin (e+f x)+a)^{m+1} (g \cos (e+f x))^{p-1} (c+d \sin (e+f x))^n \left (\frac {c+d \sin (e+f x)}{c-d}\right )^{-n} F_1\left (\frac {1}{2} (2 m+p+1);\frac {1-p}{2},-n;\frac {1}{2} (2 m+p+3);\frac {1}{2} (\sin (e+f x)+1),-\frac {d (\sin (e+f x)+1)}{c-d}\right )}{a f (2 m+p+1)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 143
Rule 144
Rule 145
Rule 3000
Rubi steps
\begin {align*} \int (g \cos (e+f x))^p (a+a \sin (e+f x))^m (c+d \sin (e+f x))^n \, dx &=\frac {\left (g (g \cos (e+f x))^{-1+p} (a-a \sin (e+f x))^{\frac {1-p}{2}} (a+a \sin (e+f x))^{\frac {1-p}{2}}\right ) \text {Subst}\left (\int (a-a x)^{\frac {1}{2} (-1+p)} (a+a x)^{m+\frac {1}{2} (-1+p)} (c+d x)^n \, dx,x,\sin (e+f x)\right )}{f}\\ &=\frac {\left (2^{-\frac {1}{2}+\frac {p}{2}} g (g \cos (e+f x))^{-1+p} (a-a \sin (e+f x))^{-\frac {1}{2}+\frac {1-p}{2}+\frac {p}{2}} \left (\frac {a-a \sin (e+f x)}{a}\right )^{\frac {1}{2}-\frac {p}{2}} (a+a \sin (e+f x))^{\frac {1-p}{2}}\right ) \text {Subst}\left (\int \left (\frac {1}{2}-\frac {x}{2}\right )^{\frac {1}{2} (-1+p)} (a+a x)^{m+\frac {1}{2} (-1+p)} (c+d x)^n \, dx,x,\sin (e+f x)\right )}{f}\\ &=\frac {\left (2^{-\frac {1}{2}+\frac {p}{2}} g (g \cos (e+f x))^{-1+p} (a-a \sin (e+f x))^{-\frac {1}{2}+\frac {1-p}{2}+\frac {p}{2}} \left (\frac {a-a \sin (e+f x)}{a}\right )^{\frac {1}{2}-\frac {p}{2}} (a+a \sin (e+f x))^{\frac {1-p}{2}} (c+d \sin (e+f x))^n \left (\frac {a (c+d \sin (e+f x))}{a c-a d}\right )^{-n}\right ) \text {Subst}\left (\int \left (\frac {1}{2}-\frac {x}{2}\right )^{\frac {1}{2} (-1+p)} (a+a x)^{m+\frac {1}{2} (-1+p)} \left (\frac {a c}{a c-a d}+\frac {a d x}{a c-a d}\right )^n \, dx,x,\sin (e+f x)\right )}{f}\\ &=\frac {2^{\frac {1+p}{2}} g F_1\left (\frac {1}{2} (1+2 m+p);\frac {1-p}{2},-n;\frac {1}{2} (3+2 m+p);\frac {1}{2} (1+\sin (e+f x)),-\frac {d (1+\sin (e+f x))}{c-d}\right ) (g \cos (e+f x))^{-1+p} (1-\sin (e+f x))^{\frac {1-p}{2}} (a+a \sin (e+f x))^{1+m} (c+d \sin (e+f x))^n \left (\frac {c+d \sin (e+f x)}{c-d}\right )^{-n}}{a f (1+2 m+p)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(798\) vs. \(2(168)=336\).
time = 7.91, size = 798, normalized size = 4.75 \begin {gather*} -\frac {2 F_1\left (\frac {1+p}{2};1+m+n+p,-n;\frac {3+p}{2};-\tan ^2\left (\frac {1}{4} (2 e-\pi +2 f x)\right ),-\frac {(c-d) \tan ^2\left (\frac {1}{4} (2 e-\pi +2 f x)\right )}{c+d}\right ) (g \cos (e+f x))^p \cos \left (\frac {1}{4} (2 e+\pi +2 f x)\right ) (a (1+\sin (e+f x)))^m (c+d \sin (e+f x))^n \sin \left (\frac {1}{4} (2 e+\pi +2 f x)\right )}{f \left (F_1\left (\frac {1+p}{2};1+m+n+p,-n;\frac {3+p}{2};-\tan ^2\left (\frac {1}{4} (2 e-\pi +2 f x)\right ),-\frac {(c-d) \tan ^2\left (\frac {1}{4} (2 e-\pi +2 f x)\right )}{c+d}\right )+\frac {2 (1+p) \left ((c-d) n F_1\left (\frac {3+p}{2};1+m+n+p,1-n;\frac {5+p}{2};-\tan ^2\left (\frac {1}{4} (2 e-\pi +2 f x)\right ),-\frac {(c-d) \tan ^2\left (\frac {1}{4} (2 e-\pi +2 f x)\right )}{c+d}\right )-(c+d) (1+m+n+p) F_1\left (\frac {3+p}{2};2+m+n+p,-n;\frac {5+p}{2};-\tan ^2\left (\frac {1}{4} (2 e-\pi +2 f x)\right ),-\frac {(c-d) \tan ^2\left (\frac {1}{4} (2 e-\pi +2 f x)\right )}{c+d}\right )\right ) \cot ^2\left (\frac {1}{4} (2 e+\pi +2 f x)\right )}{(c+d) (3+p)}+p F_1\left (\frac {1+p}{2};1+m+n+p,-n;\frac {3+p}{2};-\tan ^2\left (\frac {1}{4} (2 e-\pi +2 f x)\right ),-\frac {(c-d) \tan ^2\left (\frac {1}{4} (2 e-\pi +2 f x)\right )}{c+d}\right ) \sin (e+f x)-\frac {d n F_1\left (\frac {1+p}{2};1+m+n+p,-n;\frac {3+p}{2};-\tan ^2\left (\frac {1}{4} (2 e-\pi +2 f x)\right ),-\frac {(c-d) \tan ^2\left (\frac {1}{4} (2 e-\pi +2 f x)\right )}{c+d}\right ) \cos ^2(e+f x)}{c+d \sin (e+f x)}+2 (n+p) F_1\left (\frac {1+p}{2};1+m+n+p,-n;\frac {3+p}{2};-\tan ^2\left (\frac {1}{4} (2 e-\pi +2 f x)\right ),-\frac {(c-d) \tan ^2\left (\frac {1}{4} (2 e-\pi +2 f x)\right )}{c+d}\right ) \sin ^2\left (\frac {1}{4} (2 e-\pi +2 f x)\right )-\frac {2 (c-d) n F_1\left (\frac {1+p}{2};1+m+n+p,-n;\frac {3+p}{2};-\tan ^2\left (\frac {1}{4} (2 e-\pi +2 f x)\right ),-\frac {(c-d) \tan ^2\left (\frac {1}{4} (2 e-\pi +2 f x)\right )}{c+d}\right ) \sin ^2\left (\frac {1}{4} (2 e-\pi +2 f x)\right )}{c+d \sin (e+f x)}\right )} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.17, size = 0, normalized size = 0.00 \[\int \left (g \cos \left (f x +e \right )\right )^{p} \left (a +a \sin \left (f x +e \right )\right )^{m} \left (c +d \sin \left (f x +e \right )\right )^{n}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int {\left (g\,\cos \left (e+f\,x\right )\right )}^p\,{\left (a+a\,\sin \left (e+f\,x\right )\right )}^m\,{\left (c+d\,\sin \left (e+f\,x\right )\right )}^n \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________